﻿#include "pch.h"

static int SelectCallback(void* notUsed, int argc, char** argv, char** azColName)
{
	for (int i = 0; i < argc; i++)
	{
		printf("%s = %s", azColName[i], (argv[i] ? argv[i] : "NULL"));
		if (i != argc - 1)
		{
			printf(", ");
		}
	}
	printf("\n");
	return 0;
}





void o(const char*fileName) {
	try
	{
		//sqlite3* sql;
		//if (SQLITE_OK != sqlite3_open_v2(fileName, &sql, SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0)) {
		//	std::cout << "wt";
		//}
		//char* errMsg;
		//sqlite3_stmt* result;
		//const char* tair = new char[100];
		//
		///*if (SQLITE_OK != sqlite3_prepare_v2(sql, "select * from test;", ,0, &errMsg))
		//{
		//	;
		//	const char* error_msg = sqlite3_errmsg(sql);
		//	std::cout << error_msg;
		//}*/
		////while (sqlite3_step(result) == SQLITE_ROW)//如果有数据内容
		////{
		////	int c = sqlite3_column_count(result);
		////	//content = sqlite3_column_text(result, 0);
		////	//string a = string(reinterpret_cast<const char*>(UTF82GB((const char*)content)));
		////	//cout << a << endl;
		////}
		//sqlite3_close(sql);
	}
	catch (const std::exception&e)
	{
		std::cout << e.what();
	}
}

